﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using Microsoft.SharePoint.Administration;

namespace SJKP.PDFConversion.Service
{
    [ServiceBehavior(
        InstanceContextMode = InstanceContextMode.PerSession,
        ConcurrencyMode = ConcurrencyMode.Multiple,
        IncludeExceptionDetailInFaults = true)]
    public class OCRServiceImplementation : IOCRServiceContract
    {
        private OCRServiceApplication ServiceApplication
        {
            get
            {
                return SPIisWebServiceApplication.Current as OCRServiceApplication;
            }
        }

        public byte[] ProcessPdf(byte[] bytes)
        {
            return ServiceApplication.PdfConverter.Convert(bytes);
        }
    }
}
